import java.util.Timer;
import java.util.TimerTask;

/**
 * Created by Administrator on 2015/12/29.
 */
public class E14_ManyTimer {
    public static void main(String[] args) throws Exception {
        if (args.length < 1) {
            System.err.println(
                    "Usage: java E14_ManyTimers <num of timers>");
        }
        int numOfTimers = 100;
        for (int i = 0; i < numOfTimers; i++) {
            new Timer().schedule(new TimerTask() {
                public void run() {
                    System.out.println(System.currentTimeMillis());
                }
            }, numOfTimers - i);
        }
    }
}